#include "cube.h"
#include "Rotation90BaseParent.h"
class MagicCube
{
public:
	MagicCube(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, f32 len, IrrlichtDevice *dev);
	virtual ~MagicCube(void);

	bool hasStop();
	void homing();
	void setSelector();
	void setCollisionNode(ISceneNode*);
	void chooseThisCube(int id);
	void resetThisCube(int id);
	void rotate(core::vector3df pos, core::vector3df normal);

private:
	bool check();
	void reSet();

	ISceneManager* manager;
	Cube* Center;
	Cube* cubes[27]; 
	f32 length;
	IrrlichtDevice *device;
};
